﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ViewProfile.aspx.vb" Inherits="TWIN_test.EditViewProfile" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body background="../../Images/Training-Employee-Background.gif">
    <form id="form1" runat="server">
    <center><div>
            <strong><h1><font color="white">Personal Profile</font></h1>
            <asp:DetailsView 
                ID="DetailsView1" runat="server" AutoGenerateRows="False" BackColor="White" 
                BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
                DataSourceID="SqlDataSource1" DefaultMode="Edit" GridLines="Horizontal" 
                Height="50px" Width="125px" DataKeyNames="USERNAME" 
                AutoGenerateEditButton="True">
                <AlternatingRowStyle BackColor="#F7F7F7" />
                <EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                <Fields>
                    <asp:BoundField DataField="USERNAME" HeaderText="USERNAME" 
                        SortExpression="USERNAME" ReadOnly="True" />
                    <asp:BoundField DataField="STREETADDRESS" HeaderText="STREETADDRESS" 
                        SortExpression="STREETADDRESS" />
                    <asp:BoundField DataField="CITY" HeaderText="CITY" SortExpression="CITY" />
                    <asp:BoundField DataField="STATE" HeaderText="STATE" SortExpression="STATE" />
                    <asp:BoundField DataField="ZIPCODE" HeaderText="ZIPCODE" 
                        SortExpression="ZIPCODE" />
                    <asp:BoundField DataField="FIRSTNAME" HeaderText="FIRSTNAME" 
                        SortExpression="FIRSTNAME" />
                    <asp:BoundField DataField="LASTNAME" HeaderText="LASTNAME" 
                        SortExpression="LASTNAME" />
                </Fields>
                <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
                <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
                <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
            </asp:DetailsView>
            </strong>&nbsp;:<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>" 
                ProviderName="<%$ ConnectionStrings:ConnectionString2.ProviderName %>" 
                
                SelectCommand="SELECT * FROM &quot;INFO&quot; WHERE (&quot;USERNAME&quot; = :USERNAME)" 
                ConflictDetection="CompareAllValues" 
                DeleteCommand="DELETE FROM &quot;INFO&quot; WHERE &quot;USERNAME&quot; = :original_USERNAME AND &quot;STREETADDRESS&quot; = :original_STREETADDRESS AND &quot;CITY&quot; = :original_CITY AND &quot;STATE&quot; = :original_STATE AND &quot;ZIPCODE&quot; = :original_ZIPCODE AND &quot;FIRSTNAME&quot; = :original_FIRSTNAME AND &quot;LASTNAME&quot; = :original_LASTNAME" 
                InsertCommand="INSERT INTO &quot;INFO&quot; (&quot;USERNAME&quot;, &quot;STREETADDRESS&quot;, &quot;CITY&quot;, &quot;STATE&quot;, &quot;ZIPCODE&quot;, &quot;FIRSTNAME&quot;, &quot;LASTNAME&quot;) VALUES (:USERNAME, :STREETADDRESS, :CITY, :STATE, :ZIPCODE, :FIRSTNAME, :LASTNAME)" 
                OldValuesParameterFormatString="original_{0}" 
                
                UpdateCommand="UPDATE &quot;INFO&quot; SET &quot;STREETADDRESS&quot; = :STREETADDRESS, &quot;CITY&quot; = :CITY, &quot;STATE&quot; = :STATE, &quot;ZIPCODE&quot; = :ZIPCODE, &quot;FIRSTNAME&quot; = :FIRSTNAME, &quot;LASTNAME&quot; = :LASTNAME WHERE &quot;USERNAME&quot; = :original_USERNAME AND &quot;STREETADDRESS&quot; = :original_STREETADDRESS AND &quot;CITY&quot; = :original_CITY AND &quot;STATE&quot; = :original_STATE AND &quot;ZIPCODE&quot; = :original_ZIPCODE AND &quot;FIRSTNAME&quot; = :original_FIRSTNAME AND &quot;LASTNAME&quot; = :original_LASTNAME">
                <DeleteParameters>
                    <asp:Parameter Name="original_USERNAME" Type="String" />
                    <asp:Parameter Name="original_STREETADDRESS" Type="String" />
                    <asp:Parameter Name="original_CITY" Type="String" />
                    <asp:Parameter Name="original_STATE" Type="String" />
                    <asp:Parameter Name="original_ZIPCODE" Type="String" />
                    <asp:Parameter Name="original_FIRSTNAME" Type="String" />
                    <asp:Parameter Name="original_LASTNAME" Type="String" />
                </DeleteParameters>
                <InsertParameters>
                    <asp:Parameter Name="USERNAME" Type="String" />
                    <asp:Parameter Name="STREETADDRESS" Type="String" />
                    <asp:Parameter Name="CITY" Type="String" />
                    <asp:Parameter Name="STATE" Type="String" />
                    <asp:Parameter Name="ZIPCODE" Type="String" />
                    <asp:Parameter Name="FIRSTNAME" Type="String" />
                    <asp:Parameter Name="LASTNAME" Type="String" />
                </InsertParameters>
                <SelectParameters>
                    <asp:Parameter Name="USERNAME" Type="String" DefaultValue="username" />
                </SelectParameters>
                <UpdateParameters>
                    <asp:Parameter Name="STREETADDRESS" Type="String" />
                    <asp:Parameter Name="CITY" Type="String" />
                    <asp:Parameter Name="STATE" Type="String" />
                    <asp:Parameter Name="ZIPCODE" Type="String" />
                    <asp:Parameter Name="FIRSTNAME" Type="String" />
                    <asp:Parameter Name="LASTNAME" Type="String" />
                    <asp:Parameter Name="original_USERNAME" Type="String" />
                    <asp:Parameter Name="original_STREETADDRESS" Type="String" />
                    <asp:Parameter Name="original_CITY" Type="String" />
                    <asp:Parameter Name="original_STATE" Type="String" />
                    <asp:Parameter Name="original_ZIPCODE" Type="String" />
                    <asp:Parameter Name="original_FIRSTNAME" Type="String" />
                    <asp:Parameter Name="original_LASTNAME" Type="String" />
                </UpdateParameters>
            </asp:SqlDataSource>
            <br />
            

             <br />
         
            <br />
            

            <asp:Button ID="backButton" runat="server" Text="Back" />
            
            </div>
    </center>
    </form>
</body>
</html>
